NFSv4: Initialise connection to the server in nfs4_alloc_client()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 9 Jun 2021 14:04:46 +0000 (10:04 -0400)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 23 Sep 2021 20:35:21 +0000 (21:35 +0100)
commit0145539175f09e28266e2056fe3ffadca9ebeb2c
treec3c55cdf90090054701432f93eac00d1e6dccd19
parent029bb62044885dde409a2acf559564b8822a7d8f
NFSv4: Initialise connection to the server in nfs4_alloc_client()

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit?id=ff4023d0194263a0827c954f623c314978cf7ddd
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-38199

[ Upstream commit dd99e9f98fbf423ff6d365b37a98e8879170f17c ]

Set up the connection to the NFSv4 server in nfs4_alloc_client(), before
we've added the struct nfs_client to the net-namespace's nfs_client_list
so that a downed server won't cause other mounts to hang in the trunking
detection code.

Reported-by: Michael Wakabayashi <mwakabayashi@vmware.com>
Fixes: 5c6e5b60aae4 ("NFS: Fix an Oops in the pNFS files and flexfiles connection setup to the DS")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name NFSv4-Initialise-connection-to-the-server-in-nfs4_al.patch
fs/nfs/nfs4client.c